package util;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class Spider {




    public String getHTML(String url) throws IOException {
        return getDocment(url).html();
    }




    public Document getDocment(String url) throws IOException {

        Document document = null;
            document = Jsoup.connect(url)
                    .data("query", "Java")
                    .userAgent("Mozilla")
                    .cookie("auth", "token")
                    .timeout(3000)
                    .post();

        return document;
    }




}
